spacer
spacerLokken Logo
spacerLokken Binary Logo
spacer
spacer
spacer
spacer spacer spacer spacer
Write Cookies and Values
Language:   Server Sided ASP - JavaScript
Author:   Jon Lokken
Date:   4-8-2005

Description: View Example
This is used to write cookies on the users machine from the server.

<%@ LANGUAGE="JavaScript" %>
<% Response.buffer=true %>

<%
Response.Cookies("UserCookie")("Username") = "Test User";
Response.Cookies("UserCookie")("Password") = "My Password";
Response.Cookies("UserCookie")("Favorite Color") = "Blue";

// Setup Values
var now = new Date();
Response.Write(nextYear);
Response.Cookies("UserCookie").Expires = "May 10,"+(now.getYear()+1);
Response.Cookies("UserCookie").Domain = ".lokken.net";
Response.Cookies("UserCookie").Path = "/";
%>


Disclaimer:
Feel free to use this code I have written.  I only ask that you leave my name in the comments.  I take no responsibility for this code working, imply no warranty as to it's validity, and will not be held liable if you decide to try it.  I am only trying to help out others so they don't have to struggle with the same problems as me...

Associated Sites: Jon Lokken - http://www.jonlokken.com | Amy Lokken - http://www.amylokken.com | Isabel Lokken - http://www.isabellokken.com | Elizabeth Lokken - http://www.elizabethlokken.com | Lokken.us - http://www.lokken.us | Lokken.co - http://www.lokken.co | Lokken Consulting - http://www.lokkenconsulting.com
Author: Jon Lokken - http://www.lokken.net